import request from '@/utils/request'
// 获取全部数据
export function getclients(params) {
  return request({
    url: '/clients',
    params
  })
}

// 回显id数据
export function dectclients(id) {
  return request({
    url: `/clients/${id}`
  })
}
// 获取多少页
export function countclients(params) {
  return request({
    url: '/clients/count',
    params
  })
}
// 经纪人搜索获取
export function agentsclients(param) {
  return request({
    url: `/agents?_limit=${param}`
  })
}
// 新增数据
export function postclients(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}
// 编辑数据
export function dectclientslist(data) {
  return request({
    url: `/clients/${data.id}`,
    method: 'put',
    data
  })
}
// 删除数据
export function deleteclients(id) {
  return request({
    url: `/clients/${id}`,
    method: 'delete'
  })
}
